package com.fa4j.code.mate.model;

import com.fa4j.common.base.model.AbstractCmd;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import lombok.Data;


@Data
@Schema(description = "代码元数据模块创建参数")
public class CodeMateModuleCreateCmd extends AbstractCmd {

    @NotNull
    @Schema(description = "上级ID")
    private Integer parentId;

    @NotBlank
    @Size(max = 64)
    @Pattern(regexp = CodeMateConstants.PATTERN_MODULE_NAME, message = "模块名称格式错误")
    @Schema(description = "模块名称")
    private String moduleName;

    @NotNull
    @Positive
    @Schema(description = "项目模块编码")
    private Integer moduleCode;

    @NotBlank
    @Size(max = 128)
    @Schema(description = "备注")
    private String remark;
}
